﻿//version 5: created class

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UMLDesigner
{
   public class RelationshipData
    {
        public enum RelationType { Composition, Aggegation, Inheritance };
        private ClassData iniClass = new ClassData();
        private ClassData endClass = new ClassData();
        private string name;
        private string cardinalityIni;
        private string cardinalityEnd;
        private string attributeNameIni;
        private string visibilityAttrIni;
        private string visibilityAttrEnd;
        private string attributeNameEnd;

        private RelationType relationType;

        public void SetName(string newName)
        {
            name = newName;
        }

        public string GetName()
        {
            return name;
        }

        public void SetRelationType(RelationType type)
        {
            relationType = type;
        }

        public RelationType GetRelationType()
        {
            return relationType;
        }

        public ClassData GetIniClass()
        {
            return iniClass;
        }

        public ClassData GetEndClass()
        {
            return endClass;
        }

        public void SetEndClass(ClassData newEndClass)
        {
            endClass = newEndClass;
        }

        public void SetIniClass(ClassData newIniClass)
        {
            iniClass = newIniClass;
        }

        public void SetVisibilityIniAttribute(string newVisibility)
        {
            visibilityAttrIni = newVisibility;
        }

        public void SetVisibilityEndAttribute(string newVisibility)
        {
            visibilityAttrEnd = newVisibility;
        }

        public string GetVisibilityIniAttribute()
        {
            return visibilityAttrIni;
        }

        public string GetVisibilityEndAttribute()
        {
            return visibilityAttrEnd;
        }

        public void SetAttrNameIni(string newAttributeNameIni)
        {
            attributeNameIni = newAttributeNameIni;
        }

        public void SetAttrNameEnd(string newAttributeNameEnd)
        {
            attributeNameEnd = newAttributeNameEnd;
        }

        public string GetAttrNameEnd()
        {
            return attributeNameEnd;
        }

        public string GetAttrNameIni()
        {
            return attributeNameIni;
        }

        public void SetCardinalityIni(string newIniCardinality)
        {
            cardinalityIni = newIniCardinality;
        }

        public void SetCardinalityEnd(string newEndCardinality)
        {
            cardinalityEnd = newEndCardinality;
        }

        public string GetIniCardinality()
        {
            return cardinalityIni;
        }

        public string GetEndCardinality()
        {
            return cardinalityEnd;
        }
       
    }
}
